<?php


namespace app\model;


use think\Model;

class Menu extends Model
{

    protected $table = 'cms_menu';

    public function parent()
    {
        return $this->belongsTo(Menu::class, 'pid');
    }

    public function children()
    {
        return $this->hasMany(Menu::class, 'pid');
    }
}